package com.cqwu.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Sysuser entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "sysuser", catalog = "common", uniqueConstraints = @UniqueConstraint(columnNames = "loginName"))
public class Sysuser implements java.io.Serializable {

	// Fields

	private Integer id;
	private String loginName;
	private String loginPwd;
	private String realName;
	private String gender;
	private String cardId;
	private Integer birthday;
	private String department;
	private String telephone;
	private String mobileTel;
	private String qqNumb;
	private String email;
	private Integer role;

	// Constructors

	/** default constructor */
	public Sysuser() {
	}

	/** minimal constructor */
	public Sysuser(String loginName, String loginPwd, String realName) {
		this.loginName = loginName;
		this.loginPwd = loginPwd;
		this.realName = realName;
	}

	/** full constructor */
	public Sysuser(String loginName, String loginPwd, String realName,
			String gender, String cardId, Integer birthday, String department,
			String telephone, String mobileTel, String qqNumb, String email,
			Integer role) {
		this.loginName = loginName;
		this.loginPwd = loginPwd;
		this.realName = realName;
		this.gender = gender;
		this.cardId = cardId;
		this.birthday = birthday;
		this.department = department;
		this.telephone = telephone;
		this.mobileTel = mobileTel;
		this.qqNumb = qqNumb;
		this.email = email;
		this.role = role;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "loginName", unique = true, nullable = false, length = 20)
	public String getLoginName() {
		return this.loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	@Column(name = "loginPWD", nullable = false, length = 32)
	public String getLoginPwd() {
		return this.loginPwd;
	}

	public void setLoginPwd(String loginPwd) {
		this.loginPwd = loginPwd;
	}

	@Column(name = "realName", nullable = false, length = 15)
	public String getRealName() {
		return this.realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	@Column(name = "gender", length = 1)
	public String getGender() {
		return this.gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	@Column(name = "cardID", length = 18)
	public String getCardId() {
		return this.cardId;
	}

	public void setCardId(String cardId) {
		this.cardId = cardId;
	}

	@Column(name = "birthday")
	public Integer getBirthday() {
		return this.birthday;
	}

	public void setBirthday(Integer birthday) {
		this.birthday = birthday;
	}

	@Column(name = "department", length = 50)
	public String getDepartment() {
		return this.department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	@Column(name = "telephone", length = 12)
	public String getTelephone() {
		return this.telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	@Column(name = "mobileTel", length = 11)
	public String getMobileTel() {
		return this.mobileTel;
	}

	public void setMobileTel(String mobileTel) {
		this.mobileTel = mobileTel;
	}

	@Column(name = "qqNumb", length = 12)
	public String getQqNumb() {
		return this.qqNumb;
	}

	public void setQqNumb(String qqNumb) {
		this.qqNumb = qqNumb;
	}

	@Column(name = "email", length = 20)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "role")
	public Integer getRole() {
		return this.role;
	}

	public void setRole(Integer role) {
		this.role = role;
	}

	@Override
	public String toString() {
		return "Sysuser [id=" + id + ", loginName=" + loginName + ", loginPwd="
				+ loginPwd + ", realName=" + realName + ", gender=" + gender
				+ ", cardId=" + cardId + ", birthday=" + birthday
				+ ", department=" + department + ", telephone=" + telephone
				+ ", mobileTel=" + mobileTel + ", qqNumb=" + qqNumb
				+ ", email=" + email + ", role=" + role + "]";
	}

}